<template>
  <select :value="selected" @input="selected = $event.target.value">
    <option value="null">null value</option>
    <option value>Empty value</option>
  </select>
</template>
<script>
import { watch, watchEffect } from 'vue';
export default {
  name: 'MyInput',
  props: {
    selected: {
      type: [String, Number],
      required: true
    }
  },
  setup(props) {
    console.log("Setup props:", props);

    watchEffect((first, second) => {
      console.log("Watch function called with args:", first, second)
    });

    // watch(props.selected, (first, second) => {
    //   console.log("Watch props.selected function called with args:", first, second)
    // });

    watchEffect(() => props.selected, (first, second) => {
      console.log("Watch props.selected function called with args:"), first, second
    });
    return {};
  }
}
</script>
<style lang="">

</style>